home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / process.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  7.7 KB  |  203 lines

  1. /*  process.h
  2.  
  3.     Symbols and structures for process management.
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 9.0
  9.  *
  10.  *      Copyright (c) 1987, 1998 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14. /* $Revision:   9.3  $ */
  15.  
  16. #if !defined(__PROCESS_H)
  17. #define __PROCESS_H
  18.  
  19. #ifndef ___STDDEF_H
  20. #include <_stddef.h>
  21. #endif
  22.  
  23. #if !defined(RC_INVOKED)
  24.  
  25. #if defined(__STDC__)
  26. #pragma warn -nak
  27. #endif
  28.  
  29. #endif  /* !RC_INVOKED */
  30.  
  31. #ifdef __cplusplus
  32. namespace std {
  33. #endif /* __cplusplus */
  34.  
  35. /*  Modes available as first argument to the spawnxx functions. */
  36.  
  37. #define P_WAIT    0 /* child runs separately, parent waits until exit */
  38. #define P_NOWAIT  1 /* both concurrent -- not implemented */
  39. #define P_OVERLAY 2 /* child replaces parent, parent no longer exists */
  40.  
  41. #define P_NOWAITO 3 /* ASYNCH,       toss RC    */
  42. #define P_DETACH  4 /* DETACHED,     toss RC    */
  43.  
  44. #define WAIT_CHILD       0
  45. #define WAIT_GRANDCHILD      1
  46.  
  47. #ifdef __cplusplus
  48. extern "C" {
  49. #endif
  50.  
  51. int  _RTLENTRY _EXPFUNC getpid(void);
  52. void _RTLENTRY _EXPFUNC abort(void);
  53. void _RTLENTRY _EXPFUNC _cexit(void);
  54. void _RTLENTRY _EXPFUNC _c_exit(void);
  55. int  _RTLENTRY _EXPFUNC execl(const char * __path, const char * __arg0, ...);
  56. int  _RTLENTRY _EXPFUNC execle(const char * __path, const char * __arg0, ...);
  57. int  _RTLENTRY _EXPFUNC execlp(const char * __path, const char * __arg0, ...);
  58. int  _RTLENTRY _EXPFUNC execlpe(const char * __path, const char * __arg0, ...);
  59. int  _RTLENTRY _EXPFUNC execv(const char * __path, char * const * __argv);
  60. int  _RTLENTRY _EXPFUNC execve(const char * __path, char * const * __argv,
  61.                               char * const * __env);
  62. int  _RTLENTRY _EXPFUNC execvp(const char * __path, char * const * __argv);
  63. int  _RTLENTRY _EXPFUNC execvpe(const char * __path, char * const * __argv,
  64.                                 char * const * __env);
  65. void _RTLENTRY _EXPFUNC exit(int __status);
  66. void _RTLENTRY _EXPFUNC _exit(int __status);
  67. int  _RTLENTRY _EXPFUNC spawnl(int __mode, const char * __path, const char * __arg0, ...);
  68. int  _RTLENTRY _EXPFUNC spawnle(int __mode, const char * __path, const char * __arg0, ...);
  69. int  _RTLENTRY _EXPFUNC spawnlp(int __mode, const char * __path, const char * __arg0, ...);
  70. int  _RTLENTRY _EXPFUNC spawnlpe(int __mode, const char * __path, const char * __arg0, ...);
  71. int  _RTLENTRY _EXPFUNC spawnv(int __mode, const char * __path, char * const * __argv);
  72. int  _RTLENTRY _EXPFUNC spawnve(int __mode, const char * __path, char * const * __argv,
  73.                                char * const * __env);
  74. int  _RTLENTRY _EXPFUNC spawnvp(int __mode, const char * __path, char * const * __argv);
  75. int  _RTLENTRY _EXPFUNC spawnvpe(int __mode, const char * __path, char * const * __argv,
  76.                                 char * const * __env);
  77. int  _RTLENTRY _EXPFUNC system(const char * __command);
  78.  
  79.  
  80. int  _RTLENTRY _EXPFUNC _wexecl(const wchar_t * __path, const wchar_t * __arg0, ...);
  81. int  _RTLENTRY _EXPFUNC _wexecle(const wchar_t * __path, const wchar_t * __arg0, ...);
  82. int  _RTLENTRY _EXPFUNC _wexeclp(const wchar_t * __path, const wchar_t * __arg0, ...);
  83. int  _RTLENTRY _EXPFUNC _wexeclpe(const wchar_t * __path, const wchar_t * __arg0, ...);
  84. int  _RTLENTRY _EXPFUNC _wexecv(const wchar_t * __path, wchar_t * const * __argv);
  85. int  _RTLENTRY _EXPFUNC _wexecve(const wchar_t * __path, wchar_t * const * __argv,
  86.                               wchar_t * const * __env);
  87. int  _RTLENTRY _EXPFUNC _wexecvp(const wchar_t * __path, wchar_t * const * __argv);
  88. int  _RTLENTRY _EXPFUNC _wexecvpe(const wchar_t * __path, wchar_t * const * __argv,
  89.                                 wchar_t * const * __env);
  90. int  _RTLENTRY _EXPFUNC _wspawnl(int __mode, const wchar_t * __path, const wchar_t * __arg0, ...);
  91. int  _RTLENTRY _EXPFUNC _wspawnle(int __mode, const wchar_t * __path, const wchar_t * __arg0, ...);
  92. int  _RTLENTRY _EXPFUNC _wspawnlp(int __mode, const wchar_t * __path, const wchar_t * __arg0, ...);
  93. int  _RTLENTRY _EXPFUNC _wspawnlpe(int __mode, const wchar_t * __path, const wchar_t * __arg0, ...);
  94. int  _RTLENTRY _EXPFUNC _wspawnv(int __mode, const wchar_t * __path, wchar_t * const * __argv);
  95. int  _RTLENTRY _EXPFUNC _wspawnve(int __mode, const wchar_t * __path, wchar_t * const * __argv,
  96.                                wchar_t * const * __env);
  97. int  _RTLENTRY _EXPFUNC _wspawnvp(int __mode, const wchar_t * __path, wchar_t * const * __argv);
  98. int  _RTLENTRY _EXPFUNC _wspawnvpe(int __mode, const wchar_t * __path, wchar_t * const * __argv,
  99.                                 wchar_t * const * __env);
  100. int  _RTLENTRY _EXPFUNC _wsystem(const wchar_t * __command);
  101.  
  102.  
  103. #if defined(__MT__)
  104.  
  105. unsigned long _RTLENTRY _EXPFUNC _beginthread  (void (_USERENTRY *__start)(void *),
  106.                                                 unsigned __stksize, void *__arg);
  107. unsigned long _RTLENTRY _EXPFUNC _beginthreadNT(void (_USERENTRY *__start)(void *),
  108.                                                 unsigned __stksize, void *__arg,
  109.                                                 void *__security_attr,
  110.                                                 unsigned long __create_flags,
  111.                                                 unsigned long *__thread_id);
  112.  
  113. void _RTLENTRY _EXPFUNC _endthread     (void);
  114.  
  115. /* Support for MSC or MFC source code */
  116. #define _beginthreadex(security,stksize,startaddr,arglist,initflag,threadaddr)\
  117.         _beginthreadNT(                                                       \
  118.                        ((void(_USERENTRY *)(void *))startaddr),               \
  119.                        (stksize),                                             \
  120.                        (arglist),                                             \
  121.                        (security),                                            \
  122.                        ((unsigned long)initflag),                             \
  123.                        ((unsigned long *)threadaddr)                          \
  124.                       ) /* End of _beginthreadex definition */
  125. #define _endthreadex(a) _endthread()
  126.  
  127. #endif  /* __MT__ */
  128.  
  129. int  _RTLENTRY _EXPFUNC cwait          (int *__term_stat, int __pid, int __action);
  130. int  _RTLENTRY _EXPFUNC wait           (int *__term_stat);
  131.  
  132. #ifdef __cplusplus
  133. }
  134. #endif
  135.  
  136.  
  137. #if !defined(RC_INVOKED)
  138.  
  139. #if defined(__STDC__)
  140. #pragma warn .nak
  141. #endif
  142.  
  143. #endif  /* !RC_INVOKED */
  144.  
  145. #ifdef __cplusplus
  146. } // std
  147. #endif /* __cplusplus */
  148.  
  149. #endif  /* __PROCESS_H */
  150.  
  151. #if defined(__cplusplus) && !defined(__USING_CNAME__) && !defined(__PROCESS_H_USING_LIST)
  152. #define __PROCESS_H_USING_LIST
  153.     using std::getpid;
  154.     using std::abort;
  155.     using std::_cexit;
  156.     using std::_c_exit;
  157.     using std::execl;
  158.     using std::execle;
  159.     using std::execlp;
  160.     using std::execlpe;
  161.     using std::execv;
  162.     using std::execve;
  163.     using std::execvp;
  164.     using std::execvpe;
  165.     using std::exit;
  166.     using std::_exit;
  167.     using std::spawnl;
  168.     using std::spawnle;
  169.     using std::spawnlp;
  170.     using std::spawnlpe;
  171.     using std::spawnv;
  172.     using std::spawnve;
  173.     using std::spawnvp;
  174.     using std::spawnvpe;
  175.     using std::system;
  176.     using std::_wexecl;
  177.     using std::_wexecle;
  178.     using std::_wexeclp;
  179.     using std::_wexeclpe;
  180.     using std::_wexecv;
  181.     using std::_wexecve;
  182.     using std::_wexecvp;
  183.     using std::_wexecvpe;
  184.     using std::_wspawnl;
  185.     using std::_wspawnle;
  186.     using std::_wspawnlp;
  187.     using std::_wspawnlpe;
  188.     using std::_wspawnv;
  189.     using std::_wspawnve;
  190.     using std::_wspawnvp;
  191.     using std::_wspawnvpe;
  192.     using std::_wsystem;
  193. #if defined(__MT__)
  194.     using std::_beginthread;
  195.     using std::_beginthreadNT;
  196.     using std::_endthread;
  197. #endif // __MT__
  198.     using std::cwait;
  199.     using std::wait;
  200. #endif /* __USING_CNAME__ */
  201.  
  202.  
  203.